Fix for xterm reportBackground query.
authorChong Yidong <cyd@gnu.org>
Sat, 16 Jun 2012 09:56:15 +0000 (17:56 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 16 Jun 2012 09:56:15 +0000 (17:56 +0800)
* lisp/term/xterm.el (terminal-init-xterm): Discard input before
querying background mode.

lisp/ChangeLog
lisp/term/xterm.el

index 421b1e073e29a27d357fde22c6ac11e63f2ca83e..c296c23cf8401328f7c665b439e9d36d8a60dcfc 100644 (file)
@@ -1,3 +1,8 @@
+2012-06-16  Chong Yidong  <cyd@gnu.org>
+
+       * term/xterm.el (terminal-init-xterm): Discard input before
+       querying background mode (Bug#10959).
+
 2012-06-16  Stefan Merten  <smerten@oekonux.de>
 
        * textmodes/rst.el: Added and corrected some comments.
index 51e5aa5796d04ef8bc194d774aa34d13fa17e076..28fb9da0b9dbfd8e20e49aff60fa3710347b8c6e 100644 (file)
@@ -539,6 +539,7 @@ The relevant features are:
                 (and (memq 'reportBackground tocheck-capabilities)
                      version
                      (>= version 242)))
+       (discard-input)
         (send-string-to-terminal "\e]11;?\e\\")
         (when (and (equal (read-event nil nil 2) ?\e)
                    (equal (read-event nil nil 2) ?\]))